<template>
  <div id="postResume">
    <el-table
        :data="jobList"
        stripe
        style="width: 100%">
      <el-table-column
          prop="id"
          label=ID
          width="180">
      </el-table-column>
      <el-table-column
          label="编辑日期"
          width="220">
        <template slot-scope="scope">
          {{scope.row.updateDate|formatDate}}
        </template>
      </el-table-column>
      <el-table-column
          label="岗位名称"
          width="220">
        <template slot-scope="scope">
          {{scope.row.workName||'未填写'}}
        </template>
      </el-table-column>
      <el-table-column
          label="发布人">
        <template slot-scope="scope">
          {{scope.row.publisher||'未填写'}}
        </template>
      </el-table-column>
      <el-table-column
          prop="publisherWork"
          label="发布人职称">

      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="210">
        <template slot-scope="scope">
          <el-button @click="toDelivers(scope.row.id)" type="primary" size="mini">查看此岗位的投递</el-button>
        </template>
      </el-table-column>
    </el-table>

  </div>
</template>

<script>
import {getDelivers, getRecList} from "@/api/recruitment";

export default {
  name: "postResume",
  data(){
    return{
      delivers:[],
      jobList:[]
    }
  },
  created() {
    // this.getDelivers()
    this.getList()
  },
  methods:{
    toDelivers(id){
      this.$router.push({
        path:'deliversList',
        query:{
          id
        }
      })
    },
    getList(){
      this.jobList=[]
      getRecList(this.$store.getters["user/getUser"].uid).then(res=>{
        console.log(res)
        let arr=res.data.extend.recruitments
        for (let item of arr){
          if(item.state==1){
            this.jobList.push(item)
          }
        }
      })
    },

  }
}
</script>

<style lang="stylus" scoped>


</style>
